home *** CD-ROM | disk | FTP | other *** search
- unit Cciccprf;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, FileCtrl, TabNotBk, StdCtrls, Buttons, ExtCtrls, ComCtrls;
-
- type
- TCCICPrefsDlg = class(TForm)
- TabbedNotebook1: TTabbedNotebook;
- OKBtn: TBitBtn;
- CancelBtn: TBitBtn;
- HelpBtn: TBitBtn;
- RadioGroup1: TRadioGroup;
- RadioGroup2: TRadioGroup;
- RadioGroup3: TRadioGroup;
- RadioGroup4: TRadioGroup;
- RadioGroup5: TRadioGroup;
- RadioGroup6: TRadioGroup;
- Edit1: TEdit;
- Label1: TLabel;
- CheckBox1: TCheckBox;
- RadioGroup7: TRadioGroup;
- RadioGroup8: TRadioGroup;
- RadioGroup9: TRadioGroup;
- RadioGroup10: TRadioGroup;
- CheckBox2: TCheckBox;
- OpenDialog1: TOpenDialog;
- Label8: TLabel;
- Edit6: TEdit;
- Button6: TButton;
- Label9: TLabel;
- Edit7: TEdit;
- Button7: TButton;
- Label11: TLabel;
- Edit9: TEdit;
- Button9: TButton;
- CheckBox3: TCheckBox;
- procedure OKBtnClick(Sender: TObject);
- procedure FormShow(Sender: TObject);
- procedure Button6Click(Sender: TObject);
- procedure Button7Click(Sender: TObject);
- procedure Button9Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- CCICPrefsDlg: TCCICPrefsDlg;
-
- implementation
-
- {$R *.DFM}
- uses CCICCFrm;
-
- procedure TCCICPrefsDlg.OKBtnClick(Sender: TObject);
- begin
- case Tag of
- 2 : begin
- if CheckBox1.Checked then
- begin
- PasswordControlVector := 1;
- end
- else
- begin
- PassWordControlVector := 2;
- end;
- case RadioGroup6.ItemIndex of
- 0 : DefaultDownloadVector := 3;
- 1 : begin
- case RadioGroup5.ItemIndex of
- 0 : DefaultDownloadVector := 2;
- 1 : DefaultDownloadVector := 1;
- end;
- end;
- end;
- try
- TheAnonRedialVector := StrToInt( Edit1.Text );
- if TheAnonRedialVector < 1 then TheAnonRedialVector := 1;
- if TheAnonRedialVector > 50 then TheAnonRedialVector := 50;
- except
- On EConvertError do
- begin
- TheAnonRedialVector := 20;
- end;
- end;
- end;
- 3 : begin
- if Edit6.Text[ Length( Edit6.Text ) ] = '\' then
- Edit6.Text := Copy( Edit6.Text , 1 , (Length( Edit6.Text ) - 1 ));
- if DirectoryExists( Edit6.Text ) then
- MailPath := Edit6.Text;
- if Edit7.Text[ Length( Edit7.Text ) ] = '\' then
- Edit7.Text := Copy( Edit7.Text , 1 , (Length( Edit7.Text ) - 1 ));
- if DirectoryExists( Edit6.Text ) then
- NewsPath := Edit7.Text;
- if Edit9.Text[ Length( Edit9.Text ) ] = '\' then
- Edit9.Text := Copy( Edit9.Text , 1 , (Length( Edit9.Text ) - 1 ));
- if DirectoryExists( Edit9.Text ) then
- FTPPath := Edit9.Text;
- end;
- 4 : begin
- if CheckBox2.Checked then NewsInitialUpdateVector := 1 else
- NewsInitialUpdateVector := 2;
- NewsReadArticlePurgingVector := RadioGroup7.ItemIndex + 1;
- NewsReadArticleDisplayVector := RadioGroup8.ItemIndex + 1;
- NewsUUMIMEVector := RadioGroup9.ItemIndex + 1;
- NewsPostQueueingVector := RadioGroup10.ItemIndex + 1;
- end;
- 6 : begin { Email options }
- if CheckBox3.Checked then EMPasswordControlVector := 1 else
- EMPasswordControlVector := 2;
- EMRemoteDeletionVector := RadioGroup1.ItemIndex + 1;
- EMChokeVector := RadioGroup2.ItemIndex + 1;
- EMDefaultDownloadVector := RadioGroup3.ItemIndex + 1;
- EMQueueVector := RadioGroup4.ItemIndex + 1;
- end;
- end;
- end;
-
- procedure TCCICPrefsDlg.FormShow(Sender: TObject);
- begin
- case Tag of
- 2 : begin
- case PasswordControlVector of
- 1 : CheckBox1.Checked := true;
- 2 : CheckBox1.Checked := false;
- end;
- case DefaultDownloadVector of
- 1 : begin
- RadioGroup5.ItemIndex := 1;
- RadioGroup6.ItemIndex := 1;
- end;
- 2 : begin
- RadioGroup5.ItemIndex := 0;
- RadioGroup6.ItemIndex := 1;
- end;
- 3 : begin
- RadioGroup5.ItemIndex := 0;
- RadioGroup6.ItemIndex := 0;
- end;
- end;
- Edit1.Text := IntToStr( TheAnonRedialVector );
- end;
- 3 : begin
- Edit6.Text := Mailpath;
- Edit7.Text := NewsPath;
- Edit9.Text := FTPPath;
- end;
- 4 : begin
- case NewsInitialUpdateVector of
- 1 : CheckBox2.Checked := true;
- 2 : CheckBox2.Checked := false;
- end;
- RadioGroup7.ItemIndex := NewsReadArticlePurgingVector - 1;
- RadioGroup8.ItemIndex := NewsReadArticleDisplayVector - 1;
- RadioGroup9.ItemIndex := NewsUUMIMEVector - 1;
- RadioGroup10.ItemIndex := NewsPostQueueingVector - 1;
- end;
- 6 : begin { Email options }
- case EMPasswordControlVector of
- 1 : CheckBox3.Checked := true;
- 2 : CheckBox3.Checked := false;
- end;
- case EMRemoteDeletionVector of
- 1 : begin
- RadioGroup1.ItemIndex := 0;
- end;
- 2 : begin
- RadioGroup1.ItemIndex := 1;
- end;
- end;
- case EMChokeVector of
- 1 : begin
- RadioGroup2.ItemIndex := 0;
- end;
- 2 : begin
- RadioGroup2.ItemIndex := 1;
- end;
- end;
- case EMDefaultDownloadVector of
- 1 : begin
- RadioGroup3.ItemIndex := 0;
- end;
- 2 : begin
- RadioGroup3.ItemIndex := 1;
- end;
- end;
- case EMQueueVector of
- 1 : begin
- RadioGroup4.ItemIndex := 0;
- end;
- 2 : begin
- RadioGroup4.ItemIndex := 1;
- end;
- end;
- end;
- end;
- end;
-
- procedure TCCICPrefsDlg.Button6Click(Sender: TObject);
- begin
- if OpenDialog1.Execute then
- Edit6.Text := ExtractfilePath( OpenDialog1.FileName );
- end;
-
- procedure TCCICPrefsDlg.Button7Click(Sender: TObject);
- begin
- if OpenDialog1.Execute then
- Edit7.Text := ExtractfilePath( OpenDialog1.FileName );
- end;
-
- procedure TCCICPrefsDlg.Button9Click(Sender: TObject);
- begin
- if OpenDialog1.Execute then
- Edit9.Text := ExtractfilePath( OpenDialog1.FileName );
- end;
-
- end.
-